package com.sumainfor.pc.gmio.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.gmio.service.HoEleMeterService;
import com.sumainfor.pc.gmio.service.SeEleMeterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 服务管家水电燃表数录入
 */
@RestController
@RequestMapping("/secretary/HoEleMeter")
public class HoEleMeterController implements Serializable {
    @Autowired
    private HoEleMeterService hoEleMeterService;
    /**
     * 查询电表的信息列表
     */
    @PostMapping("/getHoEleMeterList")
    public JsonResult getHoEleMeterList(@RequestBody Map<String,Object>params){
        System.out.println("接收到达参数:"+params);
        return hoEleMeterService.getHoEleMeterList(params);
    }
    /**
     * 服务管家录入电表数
     */
    @PostMapping("/addHoEleMeter")
    public JsonResult addHoEleMeter(@RequestBody Map<String,Object>params){
        return hoEleMeterService.addHoEleMeter(params);
    }
    /**
     *服务管家退租的时候查询上次的水表抄表数
     */
    @GetMapping("/getHoEleMeter")
    public JsonResult getHoEleMeter(@RequestParam Map<String,Object>params){
        JsonResult result=new JsonResult();
        return result.put(hoEleMeterService.getHoEleMeter(params));
    }
    /**
     *根据电表抄表编号查询一个批次录入的一套房源的表数
     */
    @GetMapping("/getHoEleMeterBatc")
    public JsonResult getHoEleMeterBatc(@RequestParam Map<String,Object>params){
        return hoEleMeterService.getHoEleMeterBatc(params);
    }
    /**
     *租后主管撤回电表账单(账单错误)
     */
    @PostMapping("/recallHoEleMeter")
    public JsonResult recallHoEleMeter(@RequestBody Map<String,Object>params){
        return hoEleMeterService.recallHoEleMeter(params);
    }
    /**
     *租后主管撤回电表账单(审核错误)
     */
    @PostMapping("/examHoEleMeter")
    public JsonResult examHoEleMeter(@RequestBody Map<String,Object>params){
        return hoEleMeterService.examHoEleMeter(params);
    }
    /**
     *获取蜂电智能电表的离线设备列表
     */
    @PostMapping("/reportOfflinehour")
    public JsonResult reportOfflinehour(@RequestBody Map<String,Object>params){
        return hoEleMeterService.reportOfflinehour(params);
    }
    /**
     *获取科技侠的门锁列表
     */
    @PostMapping("/lockList")
    public JsonResult lockList(@RequestBody Map<String,Object>params){
        return hoEleMeterService.lockList(params);
    }
    /**
     *获取果加的门锁列表
     */
    @PostMapping("/guoJiaLockList")
    public JsonResult guoJiaLockList(@RequestBody Map<String,Object>params){
        return hoEleMeterService.guoJiaLockList(params);
    }

}
